/*
 * Copyright 2018 Google
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/firestore/v1beta1/write.proto

#include "google/firestore/v1beta1/write.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// This is a temporary google only hack
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)
namespace google {
namespace firestore {
namespace v1beta1 {
class WriteDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Write>
      _instance;
  const ::google::firestore::v1beta1::Document* update_;
  ::google::protobuf::internal::ArenaStringPtr delete__;
  const ::google::firestore::v1beta1::DocumentTransform* transform_;
} _Write_default_instance_;
class DocumentTransform_FieldTransformDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<DocumentTransform_FieldTransform>
      _instance;
  int set_to_server_value_;
  const ::google::firestore::v1beta1::Value* numeric_add_;
  const ::google::firestore::v1beta1::ArrayValue* append_missing_elements_;
  const ::google::firestore::v1beta1::ArrayValue* remove_all_from_array_;
} _DocumentTransform_FieldTransform_default_instance_;
class DocumentTransformDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<DocumentTransform>
      _instance;
} _DocumentTransform_default_instance_;
class WriteResultDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<WriteResult>
      _instance;
} _WriteResult_default_instance_;
class DocumentChangeDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<DocumentChange>
      _instance;
} _DocumentChange_default_instance_;
class DocumentDeleteDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<DocumentDelete>
      _instance;
} _DocumentDelete_default_instance_;
class DocumentRemoveDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<DocumentRemove>
      _instance;
} _DocumentRemove_default_instance_;
class ExistenceFilterDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ExistenceFilter>
      _instance;
} _ExistenceFilter_default_instance_;
}  // namespace v1beta1
}  // namespace firestore
}  // namespace google
namespace protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto {
void InitDefaultsWriteImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument();
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentTransform();
  protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask();
  protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsPrecondition();
  {
    void* ptr = &::google::firestore::v1beta1::_Write_default_instance_;
    new (ptr) ::google::firestore::v1beta1::Write();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::Write::InitAsDefaultInstance();
}

void InitDefaultsWrite() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsWriteImpl);
}

void InitDefaultsDocumentTransform_FieldTransformImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValue();
  {
    void* ptr = &::google::firestore::v1beta1::_DocumentTransform_FieldTransform_default_instance_;
    new (ptr) ::google::firestore::v1beta1::DocumentTransform_FieldTransform();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::DocumentTransform_FieldTransform::InitAsDefaultInstance();
}

void InitDefaultsDocumentTransform_FieldTransform() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDocumentTransform_FieldTransformImpl);
}

void InitDefaultsDocumentTransformImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentTransform_FieldTransform();
  {
    void* ptr = &::google::firestore::v1beta1::_DocumentTransform_default_instance_;
    new (ptr) ::google::firestore::v1beta1::DocumentTransform();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::DocumentTransform::InitAsDefaultInstance();
}

void InitDefaultsDocumentTransform() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDocumentTransformImpl);
}

void InitDefaultsWriteResultImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValue();
  {
    void* ptr = &::google::firestore::v1beta1::_WriteResult_default_instance_;
    new (ptr) ::google::firestore::v1beta1::WriteResult();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::WriteResult::InitAsDefaultInstance();
}

void InitDefaultsWriteResult() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsWriteResultImpl);
}

void InitDefaultsDocumentChangeImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument();
  {
    void* ptr = &::google::firestore::v1beta1::_DocumentChange_default_instance_;
    new (ptr) ::google::firestore::v1beta1::DocumentChange();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::DocumentChange::InitAsDefaultInstance();
}

void InitDefaultsDocumentChange() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDocumentChangeImpl);
}

void InitDefaultsDocumentDeleteImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  {
    void* ptr = &::google::firestore::v1beta1::_DocumentDelete_default_instance_;
    new (ptr) ::google::firestore::v1beta1::DocumentDelete();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::DocumentDelete::InitAsDefaultInstance();
}

void InitDefaultsDocumentDelete() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDocumentDeleteImpl);
}

void InitDefaultsDocumentRemoveImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  {
    void* ptr = &::google::firestore::v1beta1::_DocumentRemove_default_instance_;
    new (ptr) ::google::firestore::v1beta1::DocumentRemove();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::DocumentRemove::InitAsDefaultInstance();
}

void InitDefaultsDocumentRemove() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDocumentRemoveImpl);
}

void InitDefaultsExistenceFilterImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
  ::google::protobuf::internal::InitProtobufDefaults();
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  {
    void* ptr = &::google::firestore::v1beta1::_ExistenceFilter_default_instance_;
    new (ptr) ::google::firestore::v1beta1::ExistenceFilter();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1beta1::ExistenceFilter::InitAsDefaultInstance();
}

void InitDefaultsExistenceFilter() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsExistenceFilterImpl);
}

::google::protobuf::Metadata file_level_metadata[8];
const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];

const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Write, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Write, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  offsetof(::google::firestore::v1beta1::WriteDefaultTypeInternal, update_),
  offsetof(::google::firestore::v1beta1::WriteDefaultTypeInternal, delete__),
  offsetof(::google::firestore::v1beta1::WriteDefaultTypeInternal, transform_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Write, update_mask_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Write, current_document_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Write, operation_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentTransform_FieldTransform, _internal_metadata_),
  ~0u,  // no _extensions_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentTransform_FieldTransform, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentTransform_FieldTransform, field_path_),
  offsetof(::google::firestore::v1beta1::DocumentTransform_FieldTransformDefaultTypeInternal, set_to_server_value_),
  offsetof(::google::firestore::v1beta1::DocumentTransform_FieldTransformDefaultTypeInternal, numeric_add_),
  offsetof(::google::firestore::v1beta1::DocumentTransform_FieldTransformDefaultTypeInternal, append_missing_elements_),
  offsetof(::google::firestore::v1beta1::DocumentTransform_FieldTransformDefaultTypeInternal, remove_all_from_array_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentTransform_FieldTransform, transform_type_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentTransform, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentTransform, document_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentTransform, field_transforms_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResult, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResult, update_time_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResult, transform_results_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentChange, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentChange, document_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentChange, target_ids_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentChange, removed_target_ids_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentDelete, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentDelete, document_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentDelete, removed_target_ids_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentDelete, read_time_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentRemove, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentRemove, document_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentRemove, removed_target_ids_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentRemove, read_time_),
  ~0u,  // no _has_bits_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ExistenceFilter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ExistenceFilter, target_id_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ExistenceFilter, count_),
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, sizeof(::google::firestore::v1beta1::Write)},
  { 11, -1, sizeof(::google::firestore::v1beta1::DocumentTransform_FieldTransform)},
  { 22, -1, sizeof(::google::firestore::v1beta1::DocumentTransform)},
  { 29, -1, sizeof(::google::firestore::v1beta1::WriteResult)},
  { 36, -1, sizeof(::google::firestore::v1beta1::DocumentChange)},
  { 44, -1, sizeof(::google::firestore::v1beta1::DocumentDelete)},
  { 52, -1, sizeof(::google::firestore::v1beta1::DocumentRemove)},
  { 60, -1, sizeof(::google::firestore::v1beta1::ExistenceFilter)},
};

static ::google::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_Write_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_DocumentTransform_FieldTransform_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_DocumentTransform_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_WriteResult_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_DocumentChange_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_DocumentDelete_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_DocumentRemove_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ExistenceFilter_default_instance_),
};

void protobuf_AssignDescriptors() {
  AddDescriptors();
  ::google::protobuf::MessageFactory* factory = NULL;
  AssignDescriptors(
      "google/firestore/v1beta1/write.proto", schemas, file_default_instances, TableStruct::offsets, factory,
      file_level_metadata, file_level_enum_descriptors, NULL);
}

void protobuf_AssignDescriptorsOnce() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
}

void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 8);
}

void AddDescriptorsImpl() {
  InitDefaults();
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
      "\n$google/firestore/v1beta1/write.proto\022\030"
      "google.firestore.v1beta1\032\034google/api/ann"
      "otations.proto\032%google/firestore/v1beta1"
      "/common.proto\032\'google/firestore/v1beta1/"
      "document.proto\032\037google/protobuf/timestam"
      "p.proto\"\235\002\n\005Write\0224\n\006update\030\001 \001(\0132\".goog"
      "le.firestore.v1beta1.DocumentH\000\022\020\n\006delet"
      "e\030\002 \001(\tH\000\022@\n\ttransform\030\006 \001(\0132+.google.fi"
      "restore.v1beta1.DocumentTransformH\000\022;\n\013u"
      "pdate_mask\030\003 \001(\0132&.google.firestore.v1be"
      "ta1.DocumentMask\022@\n\020current_document\030\004 \001"
      "(\0132&.google.firestore.v1beta1.Preconditi"
      "onB\013\n\toperation\"\242\004\n\021DocumentTransform\022\020\n"
      "\010document\030\001 \001(\t\022T\n\020field_transforms\030\002 \003("
      "\0132:.google.firestore.v1beta1.DocumentTra"
      "nsform.FieldTransform\032\244\003\n\016FieldTransform"
      "\022\022\n\nfield_path\030\001 \001(\t\022e\n\023set_to_server_va"
      "lue\030\002 \001(\0162F.google.firestore.v1beta1.Doc"
      "umentTransform.FieldTransform.ServerValu"
      "eH\000\0226\n\013numeric_add\030\003 \001(\0132\037.google.firest"
      "ore.v1beta1.ValueH\000\022G\n\027append_missing_el"
      "ements\030\006 \001(\0132$.google.firestore.v1beta1."
      "ArrayValueH\000\022E\n\025remove_all_from_array\030\007 "
      "\001(\0132$.google.firestore.v1beta1.ArrayValu"
      "eH\000\"=\n\013ServerValue\022\034\n\030SERVER_VALUE_UNSPE"
      "CIFIED\020\000\022\020\n\014REQUEST_TIME\020\001B\020\n\016transform_"
      "type\"z\n\013WriteResult\022/\n\013update_time\030\001 \001(\013"
      "2\032.google.protobuf.Timestamp\022:\n\021transfor"
      "m_results\030\002 \003(\0132\037.google.firestore.v1bet"
      "a1.Value\"v\n\016DocumentChange\0224\n\010document\030\001"
      " \001(\0132\".google.firestore.v1beta1.Document"
      "\022\022\n\ntarget_ids\030\005 \003(\005\022\032\n\022removed_target_i"
      "ds\030\006 \003(\005\"m\n\016DocumentDelete\022\020\n\010document\030\001"
      " \001(\t\022\032\n\022removed_target_ids\030\006 \003(\005\022-\n\tread"
      "_time\030\004 \001(\0132\032.google.protobuf.Timestamp\""
      "m\n\016DocumentRemove\022\020\n\010document\030\001 \001(\t\022\032\n\022r"
      "emoved_target_ids\030\002 \003(\005\022-\n\tread_time\030\004 \001"
      "(\0132\032.google.protobuf.Timestamp\"3\n\017Existe"
      "nceFilter\022\021\n\ttarget_id\030\001 \001(\005\022\r\n\005count\030\002 "
      "\001(\005B\270\001\n\034com.google.firestore.v1beta1B\nWr"
      "iteProtoP\001ZAgoogle.golang.org/genproto/g"
      "oogleapis/firestore/v1beta1;firestore\242\002\004"
      "GCFS\252\002\036Google.Cloud.Firestore.V1Beta1\312\002\036"
      "Google\\Cloud\\Firestore\\V1beta1b\006proto3"
  };
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
      descriptor, 1758);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "google/firestore/v1beta1/write.proto", &protobuf_RegisterTypes);
  ::protobuf_google_2fapi_2fannotations_2eproto::AddDescriptors();
  ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::AddDescriptors();
  ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::AddDescriptors();
  ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
}

void AddDescriptors() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
  StaticDescriptorInitializer() {
    AddDescriptors();
  }
} static_descriptor_initializer;
}  // namespace protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto
namespace google {
namespace firestore {
namespace v1beta1 {
const ::google::protobuf::EnumDescriptor* DocumentTransform_FieldTransform_ServerValue_descriptor() {
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_enum_descriptors[0];
}
bool DocumentTransform_FieldTransform_ServerValue_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const DocumentTransform_FieldTransform_ServerValue DocumentTransform_FieldTransform::SERVER_VALUE_UNSPECIFIED;
const DocumentTransform_FieldTransform_ServerValue DocumentTransform_FieldTransform::REQUEST_TIME;
const DocumentTransform_FieldTransform_ServerValue DocumentTransform_FieldTransform::ServerValue_MIN;
const DocumentTransform_FieldTransform_ServerValue DocumentTransform_FieldTransform::ServerValue_MAX;
const int DocumentTransform_FieldTransform::ServerValue_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

// ===================================================================

void Write::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_Write_default_instance_.update_ = const_cast< ::google::firestore::v1beta1::Document*>(
      ::google::firestore::v1beta1::Document::internal_default_instance());
  ::google::firestore::v1beta1::_Write_default_instance_.delete__.UnsafeSetDefault(
      &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1beta1::_Write_default_instance_.transform_ = const_cast< ::google::firestore::v1beta1::DocumentTransform*>(
      ::google::firestore::v1beta1::DocumentTransform::internal_default_instance());
  ::google::firestore::v1beta1::_Write_default_instance_._instance.get_mutable()->update_mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>(
      ::google::firestore::v1beta1::DocumentMask::internal_default_instance());
  ::google::firestore::v1beta1::_Write_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1beta1::Precondition*>(
      ::google::firestore::v1beta1::Precondition::internal_default_instance());
}
void Write::set_allocated_update(::google::firestore::v1beta1::Document* update) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_operation();
  if (update) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      update = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, update, submessage_arena);
    }
    set_has_update();
    operation_.update_ = update;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Write.update)
}
void Write::clear_update() {
  if (has_update()) {
    delete operation_.update_;
    clear_has_operation();
  }
}
void Write::set_allocated_transform(::google::firestore::v1beta1::DocumentTransform* transform) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_operation();
  if (transform) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      transform = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, transform, submessage_arena);
    }
    set_has_transform();
    operation_.transform_ = transform;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Write.transform)
}
void Write::clear_update_mask() {
  if (GetArenaNoVirtual() == NULL && update_mask_ != NULL) {
    delete update_mask_;
  }
  update_mask_ = NULL;
}
void Write::clear_current_document() {
  if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
    delete current_document_;
  }
  current_document_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Write::kUpdateFieldNumber;
const int Write::kDeleteFieldNumber;
const int Write::kTransformFieldNumber;
const int Write::kUpdateMaskFieldNumber;
const int Write::kCurrentDocumentFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Write::Write()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWrite();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Write)
}
Write::Write(const Write& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_update_mask()) {
    update_mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.update_mask_);
  } else {
    update_mask_ = NULL;
  }
  if (from.has_current_document()) {
    current_document_ = new ::google::firestore::v1beta1::Precondition(*from.current_document_);
  } else {
    current_document_ = NULL;
  }
  clear_has_operation();
  switch (from.operation_case()) {
    case kUpdate: {
      mutable_update()->::google::firestore::v1beta1::Document::MergeFrom(from.update());
      break;
    }
    case kDelete: {
      set_delete_(from.delete_());
      break;
    }
    case kTransform: {
      mutable_transform()->::google::firestore::v1beta1::DocumentTransform::MergeFrom(from.transform());
      break;
    }
    case OPERATION_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Write)
}

void Write::SharedCtor() {
  ::memset(&update_mask_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&current_document_) -
      reinterpret_cast<char*>(&update_mask_)) + sizeof(current_document_));
  clear_has_operation();
  _cached_size_ = 0;
}

Write::~Write() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Write)
  SharedDtor();
}

void Write::SharedDtor() {
  if (this != internal_default_instance()) delete update_mask_;
  if (this != internal_default_instance()) delete current_document_;
  if (has_operation()) {
    clear_operation();
  }
}

void Write::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Write::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const Write& Write::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWrite();
  return *internal_default_instance();
}

Write* Write::New(::google::protobuf::Arena* arena) const {
  Write* n = new Write;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void Write::clear_operation() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.Write)
  switch (operation_case()) {
    case kUpdate: {
      delete operation_.update_;
      break;
    }
    case kDelete: {
      operation_.delete__.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case kTransform: {
      delete operation_.transform_;
      break;
    }
    case OPERATION_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = OPERATION_NOT_SET;
}


void Write::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Write)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (GetArenaNoVirtual() == NULL && update_mask_ != NULL) {
    delete update_mask_;
  }
  update_mask_ = NULL;
  if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
    delete current_document_;
  }
  current_document_ = NULL;
  clear_operation();
  _internal_metadata_.Clear();
}

bool Write::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Write)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .google.firestore.v1beta1.Document update = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_update()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string delete = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_delete_()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->delete_().data(), static_cast<int>(this->delete_().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.Write.delete"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.DocumentMask update_mask = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_update_mask()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.Precondition current_document = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_current_document()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.DocumentTransform transform = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_transform()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Write)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Write)
  return false;
#undef DO_
}

void Write::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Write)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.Document update = 1;
  if (has_update()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, *operation_.update_, output);
  }

  // string delete = 2;
  if (has_delete_()) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->delete_().data(), static_cast<int>(this->delete_().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.Write.delete");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->delete_(), output);
  }

  // .google.firestore.v1beta1.DocumentMask update_mask = 3;
  if (this->has_update_mask()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, *this->update_mask_, output);
  }

  // .google.firestore.v1beta1.Precondition current_document = 4;
  if (this->has_current_document()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, *this->current_document_, output);
  }

  // .google.firestore.v1beta1.DocumentTransform transform = 6;
  if (has_transform()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, *operation_.transform_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Write)
}

::google::protobuf::uint8* Write::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Write)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.Document update = 1;
  if (has_update()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, *operation_.update_, deterministic, target);
  }

  // string delete = 2;
  if (has_delete_()) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->delete_().data(), static_cast<int>(this->delete_().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.Write.delete");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->delete_(), target);
  }

  // .google.firestore.v1beta1.DocumentMask update_mask = 3;
  if (this->has_update_mask()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, *this->update_mask_, deterministic, target);
  }

  // .google.firestore.v1beta1.Precondition current_document = 4;
  if (this->has_current_document()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, *this->current_document_, deterministic, target);
  }

  // .google.firestore.v1beta1.DocumentTransform transform = 6;
  if (has_transform()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        6, *operation_.transform_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Write)
  return target;
}

size_t Write::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Write)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // .google.firestore.v1beta1.DocumentMask update_mask = 3;
  if (this->has_update_mask()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->update_mask_);
  }

  // .google.firestore.v1beta1.Precondition current_document = 4;
  if (this->has_current_document()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->current_document_);
  }

  switch (operation_case()) {
    // .google.firestore.v1beta1.Document update = 1;
    case kUpdate: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *operation_.update_);
      break;
    }
    // string delete = 2;
    case kDelete: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->delete_());
      break;
    }
    // .google.firestore.v1beta1.DocumentTransform transform = 6;
    case kTransform: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *operation_.transform_);
      break;
    }
    case OPERATION_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Write::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Write)
  GOOGLE_DCHECK_NE(&from, this);
  const Write* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const Write>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Write)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Write)
    MergeFrom(*source);
  }
}

void Write::MergeFrom(const Write& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Write)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.has_update_mask()) {
    mutable_update_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.update_mask());
  }
  if (from.has_current_document()) {
    mutable_current_document()->::google::firestore::v1beta1::Precondition::MergeFrom(from.current_document());
  }
  switch (from.operation_case()) {
    case kUpdate: {
      mutable_update()->::google::firestore::v1beta1::Document::MergeFrom(from.update());
      break;
    }
    case kDelete: {
      set_delete_(from.delete_());
      break;
    }
    case kTransform: {
      mutable_transform()->::google::firestore::v1beta1::DocumentTransform::MergeFrom(from.transform());
      break;
    }
    case OPERATION_NOT_SET: {
      break;
    }
  }
}

void Write::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Write)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Write::CopyFrom(const Write& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Write)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Write::IsInitialized() const {
  return true;
}

void Write::Swap(Write* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Write::InternalSwap(Write* other) {
  using std::swap;
  swap(update_mask_, other->update_mask_);
  swap(current_document_, other->current_document_);
  swap(operation_, other->operation_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata Write::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void DocumentTransform_FieldTransform::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_DocumentTransform_FieldTransform_default_instance_.set_to_server_value_ = 0;
  ::google::firestore::v1beta1::_DocumentTransform_FieldTransform_default_instance_.numeric_add_ = const_cast< ::google::firestore::v1beta1::Value*>(
      ::google::firestore::v1beta1::Value::internal_default_instance());
  ::google::firestore::v1beta1::_DocumentTransform_FieldTransform_default_instance_.append_missing_elements_ = const_cast< ::google::firestore::v1beta1::ArrayValue*>(
      ::google::firestore::v1beta1::ArrayValue::internal_default_instance());
  ::google::firestore::v1beta1::_DocumentTransform_FieldTransform_default_instance_.remove_all_from_array_ = const_cast< ::google::firestore::v1beta1::ArrayValue*>(
      ::google::firestore::v1beta1::ArrayValue::internal_default_instance());
}
void DocumentTransform_FieldTransform::set_allocated_numeric_add(::google::firestore::v1beta1::Value* numeric_add) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_transform_type();
  if (numeric_add) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      numeric_add = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, numeric_add, submessage_arena);
    }
    set_has_numeric_add();
    transform_type_.numeric_add_ = numeric_add;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DocumentTransform.FieldTransform.numeric_add)
}
void DocumentTransform_FieldTransform::clear_numeric_add() {
  if (has_numeric_add()) {
    delete transform_type_.numeric_add_;
    clear_has_transform_type();
  }
}
void DocumentTransform_FieldTransform::set_allocated_append_missing_elements(::google::firestore::v1beta1::ArrayValue* append_missing_elements) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_transform_type();
  if (append_missing_elements) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      append_missing_elements = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, append_missing_elements, submessage_arena);
    }
    set_has_append_missing_elements();
    transform_type_.append_missing_elements_ = append_missing_elements;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DocumentTransform.FieldTransform.append_missing_elements)
}
void DocumentTransform_FieldTransform::clear_append_missing_elements() {
  if (has_append_missing_elements()) {
    delete transform_type_.append_missing_elements_;
    clear_has_transform_type();
  }
}
void DocumentTransform_FieldTransform::set_allocated_remove_all_from_array(::google::firestore::v1beta1::ArrayValue* remove_all_from_array) {
  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  clear_transform_type();
  if (remove_all_from_array) {
    ::google::protobuf::Arena* submessage_arena = NULL;
    if (message_arena != submessage_arena) {
      remove_all_from_array = ::google::protobuf::internal::GetOwnedMessage(
          message_arena, remove_all_from_array, submessage_arena);
    }
    set_has_remove_all_from_array();
    transform_type_.remove_all_from_array_ = remove_all_from_array;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DocumentTransform.FieldTransform.remove_all_from_array)
}
void DocumentTransform_FieldTransform::clear_remove_all_from_array() {
  if (has_remove_all_from_array()) {
    delete transform_type_.remove_all_from_array_;
    clear_has_transform_type();
  }
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DocumentTransform_FieldTransform::kFieldPathFieldNumber;
const int DocumentTransform_FieldTransform::kSetToServerValueFieldNumber;
const int DocumentTransform_FieldTransform::kNumericAddFieldNumber;
const int DocumentTransform_FieldTransform::kAppendMissingElementsFieldNumber;
const int DocumentTransform_FieldTransform::kRemoveAllFromArrayFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DocumentTransform_FieldTransform::DocumentTransform_FieldTransform()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentTransform_FieldTransform();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.DocumentTransform.FieldTransform)
}
DocumentTransform_FieldTransform::DocumentTransform_FieldTransform(const DocumentTransform_FieldTransform& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  field_path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.field_path().size() > 0) {
    field_path_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.field_path_);
  }
  clear_has_transform_type();
  switch (from.transform_type_case()) {
    case kSetToServerValue: {
      set_set_to_server_value(from.set_to_server_value());
      break;
    }
    case kNumericAdd: {
      mutable_numeric_add()->::google::firestore::v1beta1::Value::MergeFrom(from.numeric_add());
      break;
    }
    case kAppendMissingElements: {
      mutable_append_missing_elements()->::google::firestore::v1beta1::ArrayValue::MergeFrom(from.append_missing_elements());
      break;
    }
    case kRemoveAllFromArray: {
      mutable_remove_all_from_array()->::google::firestore::v1beta1::ArrayValue::MergeFrom(from.remove_all_from_array());
      break;
    }
    case TRANSFORM_TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.DocumentTransform.FieldTransform)
}

void DocumentTransform_FieldTransform::SharedCtor() {
  field_path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_transform_type();
  _cached_size_ = 0;
}

DocumentTransform_FieldTransform::~DocumentTransform_FieldTransform() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.DocumentTransform.FieldTransform)
  SharedDtor();
}

void DocumentTransform_FieldTransform::SharedDtor() {
  field_path_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (has_transform_type()) {
    clear_transform_type();
  }
}

void DocumentTransform_FieldTransform::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DocumentTransform_FieldTransform::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const DocumentTransform_FieldTransform& DocumentTransform_FieldTransform::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentTransform_FieldTransform();
  return *internal_default_instance();
}

DocumentTransform_FieldTransform* DocumentTransform_FieldTransform::New(::google::protobuf::Arena* arena) const {
  DocumentTransform_FieldTransform* n = new DocumentTransform_FieldTransform;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DocumentTransform_FieldTransform::clear_transform_type() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.DocumentTransform.FieldTransform)
  switch (transform_type_case()) {
    case kSetToServerValue: {
      // No need to clear
      break;
    }
    case kNumericAdd: {
      delete transform_type_.numeric_add_;
      break;
    }
    case kAppendMissingElements: {
      delete transform_type_.append_missing_elements_;
      break;
    }
    case kRemoveAllFromArray: {
      delete transform_type_.remove_all_from_array_;
      break;
    }
    case TRANSFORM_TYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = TRANSFORM_TYPE_NOT_SET;
}


void DocumentTransform_FieldTransform::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.DocumentTransform.FieldTransform)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  field_path_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_transform_type();
  _internal_metadata_.Clear();
}

bool DocumentTransform_FieldTransform::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.DocumentTransform.FieldTransform)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string field_path = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_field_path()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->field_path().data(), static_cast<int>(this->field_path().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.DocumentTransform.FieldTransform.field_path"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          set_set_to_server_value(static_cast< ::google::firestore::v1beta1::DocumentTransform_FieldTransform_ServerValue >(value));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.Value numeric_add = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_numeric_add()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.ArrayValue append_missing_elements = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_append_missing_elements()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.firestore.v1beta1.ArrayValue remove_all_from_array = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_remove_all_from_array()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.DocumentTransform.FieldTransform)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.DocumentTransform.FieldTransform)
  return false;
#undef DO_
}

void DocumentTransform_FieldTransform::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.DocumentTransform.FieldTransform)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string field_path = 1;
  if (this->field_path().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->field_path().data(), static_cast<int>(this->field_path().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.DocumentTransform.FieldTransform.field_path");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->field_path(), output);
  }

  // .google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2;
  if (has_set_to_server_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      2, this->set_to_server_value(), output);
  }

  // .google.firestore.v1beta1.Value numeric_add = 3;
  if (has_numeric_add()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, *transform_type_.numeric_add_, output);
  }

  // .google.firestore.v1beta1.ArrayValue append_missing_elements = 6;
  if (has_append_missing_elements()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, *transform_type_.append_missing_elements_, output);
  }

  // .google.firestore.v1beta1.ArrayValue remove_all_from_array = 7;
  if (has_remove_all_from_array()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      7, *transform_type_.remove_all_from_array_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.DocumentTransform.FieldTransform)
}

::google::protobuf::uint8* DocumentTransform_FieldTransform::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.DocumentTransform.FieldTransform)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string field_path = 1;
  if (this->field_path().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->field_path().data(), static_cast<int>(this->field_path().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.DocumentTransform.FieldTransform.field_path");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->field_path(), target);
  }

  // .google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2;
  if (has_set_to_server_value()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      2, this->set_to_server_value(), target);
  }

  // .google.firestore.v1beta1.Value numeric_add = 3;
  if (has_numeric_add()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, *transform_type_.numeric_add_, deterministic, target);
  }

  // .google.firestore.v1beta1.ArrayValue append_missing_elements = 6;
  if (has_append_missing_elements()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        6, *transform_type_.append_missing_elements_, deterministic, target);
  }

  // .google.firestore.v1beta1.ArrayValue remove_all_from_array = 7;
  if (has_remove_all_from_array()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        7, *transform_type_.remove_all_from_array_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.DocumentTransform.FieldTransform)
  return target;
}

size_t DocumentTransform_FieldTransform::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.DocumentTransform.FieldTransform)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // string field_path = 1;
  if (this->field_path().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->field_path());
  }

  switch (transform_type_case()) {
    // .google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2;
    case kSetToServerValue: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->set_to_server_value());
      break;
    }
    // .google.firestore.v1beta1.Value numeric_add = 3;
    case kNumericAdd: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *transform_type_.numeric_add_);
      break;
    }
    // .google.firestore.v1beta1.ArrayValue append_missing_elements = 6;
    case kAppendMissingElements: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *transform_type_.append_missing_elements_);
      break;
    }
    // .google.firestore.v1beta1.ArrayValue remove_all_from_array = 7;
    case kRemoveAllFromArray: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *transform_type_.remove_all_from_array_);
      break;
    }
    case TRANSFORM_TYPE_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DocumentTransform_FieldTransform::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.DocumentTransform.FieldTransform)
  GOOGLE_DCHECK_NE(&from, this);
  const DocumentTransform_FieldTransform* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const DocumentTransform_FieldTransform>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.DocumentTransform.FieldTransform)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.DocumentTransform.FieldTransform)
    MergeFrom(*source);
  }
}

void DocumentTransform_FieldTransform::MergeFrom(const DocumentTransform_FieldTransform& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.DocumentTransform.FieldTransform)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.field_path().size() > 0) {

    field_path_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.field_path_);
  }
  switch (from.transform_type_case()) {
    case kSetToServerValue: {
      set_set_to_server_value(from.set_to_server_value());
      break;
    }
    case kNumericAdd: {
      mutable_numeric_add()->::google::firestore::v1beta1::Value::MergeFrom(from.numeric_add());
      break;
    }
    case kAppendMissingElements: {
      mutable_append_missing_elements()->::google::firestore::v1beta1::ArrayValue::MergeFrom(from.append_missing_elements());
      break;
    }
    case kRemoveAllFromArray: {
      mutable_remove_all_from_array()->::google::firestore::v1beta1::ArrayValue::MergeFrom(from.remove_all_from_array());
      break;
    }
    case TRANSFORM_TYPE_NOT_SET: {
      break;
    }
  }
}

void DocumentTransform_FieldTransform::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.DocumentTransform.FieldTransform)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DocumentTransform_FieldTransform::CopyFrom(const DocumentTransform_FieldTransform& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.DocumentTransform.FieldTransform)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DocumentTransform_FieldTransform::IsInitialized() const {
  return true;
}

void DocumentTransform_FieldTransform::Swap(DocumentTransform_FieldTransform* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DocumentTransform_FieldTransform::InternalSwap(DocumentTransform_FieldTransform* other) {
  using std::swap;
  field_path_.Swap(&other->field_path_);
  swap(transform_type_, other->transform_type_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata DocumentTransform_FieldTransform::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void DocumentTransform::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DocumentTransform::kDocumentFieldNumber;
const int DocumentTransform::kFieldTransformsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DocumentTransform::DocumentTransform()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentTransform();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.DocumentTransform)
}
DocumentTransform::DocumentTransform(const DocumentTransform& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      field_transforms_(from.field_transforms_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  document_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.document().size() > 0) {
    document_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_);
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.DocumentTransform)
}

void DocumentTransform::SharedCtor() {
  document_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _cached_size_ = 0;
}

DocumentTransform::~DocumentTransform() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.DocumentTransform)
  SharedDtor();
}

void DocumentTransform::SharedDtor() {
  document_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void DocumentTransform::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DocumentTransform::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const DocumentTransform& DocumentTransform::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentTransform();
  return *internal_default_instance();
}

DocumentTransform* DocumentTransform::New(::google::protobuf::Arena* arena) const {
  DocumentTransform* n = new DocumentTransform;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DocumentTransform::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.DocumentTransform)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  field_transforms_.Clear();
  document_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

bool DocumentTransform::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.DocumentTransform)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string document = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_document()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->document().data(), static_cast<int>(this->document().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.DocumentTransform.document"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_field_transforms()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.DocumentTransform)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.DocumentTransform)
  return false;
#undef DO_
}

void DocumentTransform::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.DocumentTransform)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string document = 1;
  if (this->document().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->document().data(), static_cast<int>(this->document().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.DocumentTransform.document");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->document(), output);
  }

  // repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->field_transforms_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->field_transforms(static_cast<int>(i)), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.DocumentTransform)
}

::google::protobuf::uint8* DocumentTransform::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.DocumentTransform)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string document = 1;
  if (this->document().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->document().data(), static_cast<int>(this->document().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.DocumentTransform.document");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->document(), target);
  }

  // repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->field_transforms_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->field_transforms(static_cast<int>(i)), deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.DocumentTransform)
  return target;
}

size_t DocumentTransform::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.DocumentTransform)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2;
  {
    unsigned int count = static_cast<unsigned int>(this->field_transforms_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->field_transforms(static_cast<int>(i)));
    }
  }

  // string document = 1;
  if (this->document().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->document());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DocumentTransform::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.DocumentTransform)
  GOOGLE_DCHECK_NE(&from, this);
  const DocumentTransform* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const DocumentTransform>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.DocumentTransform)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.DocumentTransform)
    MergeFrom(*source);
  }
}

void DocumentTransform::MergeFrom(const DocumentTransform& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.DocumentTransform)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  field_transforms_.MergeFrom(from.field_transforms_);
  if (from.document().size() > 0) {

    document_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_);
  }
}

void DocumentTransform::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.DocumentTransform)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DocumentTransform::CopyFrom(const DocumentTransform& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.DocumentTransform)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DocumentTransform::IsInitialized() const {
  return true;
}

void DocumentTransform::Swap(DocumentTransform* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DocumentTransform::InternalSwap(DocumentTransform* other) {
  using std::swap;
  field_transforms_.InternalSwap(&other->field_transforms_);
  document_.Swap(&other->document_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata DocumentTransform::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void WriteResult::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_WriteResult_default_instance_._instance.get_mutable()->update_time_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
}
void WriteResult::clear_update_time() {
  if (GetArenaNoVirtual() == NULL && update_time_ != NULL) {
    delete update_time_;
  }
  update_time_ = NULL;
}
void WriteResult::clear_transform_results() {
  transform_results_.Clear();
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int WriteResult::kUpdateTimeFieldNumber;
const int WriteResult::kTransformResultsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

WriteResult::WriteResult()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWriteResult();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.WriteResult)
}
WriteResult::WriteResult(const WriteResult& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      transform_results_(from.transform_results_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_update_time()) {
    update_time_ = new ::google::protobuf::Timestamp(*from.update_time_);
  } else {
    update_time_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.WriteResult)
}

void WriteResult::SharedCtor() {
  update_time_ = NULL;
  _cached_size_ = 0;
}

WriteResult::~WriteResult() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.WriteResult)
  SharedDtor();
}

void WriteResult::SharedDtor() {
  if (this != internal_default_instance()) delete update_time_;
}

void WriteResult::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* WriteResult::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const WriteResult& WriteResult::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWriteResult();
  return *internal_default_instance();
}

WriteResult* WriteResult::New(::google::protobuf::Arena* arena) const {
  WriteResult* n = new WriteResult;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void WriteResult::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.WriteResult)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  transform_results_.Clear();
  if (GetArenaNoVirtual() == NULL && update_time_ != NULL) {
    delete update_time_;
  }
  update_time_ = NULL;
  _internal_metadata_.Clear();
}

bool WriteResult::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.WriteResult)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .google.protobuf.Timestamp update_time = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_update_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .google.firestore.v1beta1.Value transform_results = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_transform_results()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.WriteResult)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.WriteResult)
  return false;
#undef DO_
}

void WriteResult::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.WriteResult)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.protobuf.Timestamp update_time = 1;
  if (this->has_update_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, *this->update_time_, output);
  }

  // repeated .google.firestore.v1beta1.Value transform_results = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->transform_results_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->transform_results(static_cast<int>(i)), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.WriteResult)
}

::google::protobuf::uint8* WriteResult::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.WriteResult)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.protobuf.Timestamp update_time = 1;
  if (this->has_update_time()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, *this->update_time_, deterministic, target);
  }

  // repeated .google.firestore.v1beta1.Value transform_results = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->transform_results_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->transform_results(static_cast<int>(i)), deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.WriteResult)
  return target;
}

size_t WriteResult::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.WriteResult)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated .google.firestore.v1beta1.Value transform_results = 2;
  {
    unsigned int count = static_cast<unsigned int>(this->transform_results_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->transform_results(static_cast<int>(i)));
    }
  }

  // .google.protobuf.Timestamp update_time = 1;
  if (this->has_update_time()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->update_time_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void WriteResult::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.WriteResult)
  GOOGLE_DCHECK_NE(&from, this);
  const WriteResult* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const WriteResult>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.WriteResult)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.WriteResult)
    MergeFrom(*source);
  }
}

void WriteResult::MergeFrom(const WriteResult& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.WriteResult)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  transform_results_.MergeFrom(from.transform_results_);
  if (from.has_update_time()) {
    mutable_update_time()->::google::protobuf::Timestamp::MergeFrom(from.update_time());
  }
}

void WriteResult::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.WriteResult)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void WriteResult::CopyFrom(const WriteResult& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.WriteResult)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool WriteResult::IsInitialized() const {
  return true;
}

void WriteResult::Swap(WriteResult* other) {
  if (other == this) return;
  InternalSwap(other);
}
void WriteResult::InternalSwap(WriteResult* other) {
  using std::swap;
  transform_results_.InternalSwap(&other->transform_results_);
  swap(update_time_, other->update_time_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata WriteResult::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void DocumentChange::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_DocumentChange_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1beta1::Document*>(
      ::google::firestore::v1beta1::Document::internal_default_instance());
}
void DocumentChange::clear_document() {
  if (GetArenaNoVirtual() == NULL && document_ != NULL) {
    delete document_;
  }
  document_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DocumentChange::kDocumentFieldNumber;
const int DocumentChange::kTargetIdsFieldNumber;
const int DocumentChange::kRemovedTargetIdsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DocumentChange::DocumentChange()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentChange();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.DocumentChange)
}
DocumentChange::DocumentChange(const DocumentChange& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      target_ids_(from.target_ids_),
      removed_target_ids_(from.removed_target_ids_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_document()) {
    document_ = new ::google::firestore::v1beta1::Document(*from.document_);
  } else {
    document_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.DocumentChange)
}

void DocumentChange::SharedCtor() {
  document_ = NULL;
  _cached_size_ = 0;
}

DocumentChange::~DocumentChange() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.DocumentChange)
  SharedDtor();
}

void DocumentChange::SharedDtor() {
  if (this != internal_default_instance()) delete document_;
}

void DocumentChange::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DocumentChange::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const DocumentChange& DocumentChange::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentChange();
  return *internal_default_instance();
}

DocumentChange* DocumentChange::New(::google::protobuf::Arena* arena) const {
  DocumentChange* n = new DocumentChange;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DocumentChange::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.DocumentChange)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  target_ids_.Clear();
  removed_target_ids_.Clear();
  if (GetArenaNoVirtual() == NULL && document_ != NULL) {
    delete document_;
  }
  document_ = NULL;
  _internal_metadata_.Clear();
}

bool DocumentChange::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.DocumentChange)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // .google.firestore.v1beta1.Document document = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_document()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int32 target_ids = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_target_ids())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 42u, input, this->mutable_target_ids())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int32 removed_target_ids = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_removed_target_ids())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 50u, input, this->mutable_removed_target_ids())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.DocumentChange)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.DocumentChange)
  return false;
#undef DO_
}

void DocumentChange::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.DocumentChange)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.Document document = 1;
  if (this->has_document()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, *this->document_, output);
  }

  // repeated int32 target_ids = 5;
  if (this->target_ids_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(5, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _target_ids_cached_byte_size_));
  }
  for (int i = 0, n = this->target_ids_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
      this->target_ids(i), output);
  }

  // repeated int32 removed_target_ids = 6;
  if (this->removed_target_ids_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(6, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _removed_target_ids_cached_byte_size_));
  }
  for (int i = 0, n = this->removed_target_ids_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
      this->removed_target_ids(i), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.DocumentChange)
}

::google::protobuf::uint8* DocumentChange::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.DocumentChange)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1beta1.Document document = 1;
  if (this->has_document()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, *this->document_, deterministic, target);
  }

  // repeated int32 target_ids = 5;
  if (this->target_ids_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      5,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _target_ids_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32NoTagToArray(this->target_ids_, target);
  }

  // repeated int32 removed_target_ids = 6;
  if (this->removed_target_ids_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      6,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _removed_target_ids_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32NoTagToArray(this->removed_target_ids_, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.DocumentChange)
  return target;
}

size_t DocumentChange::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.DocumentChange)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated int32 target_ids = 5;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->target_ids_);
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _target_ids_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated int32 removed_target_ids = 6;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->removed_target_ids_);
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _removed_target_ids_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // .google.firestore.v1beta1.Document document = 1;
  if (this->has_document()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->document_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DocumentChange::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.DocumentChange)
  GOOGLE_DCHECK_NE(&from, this);
  const DocumentChange* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const DocumentChange>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.DocumentChange)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.DocumentChange)
    MergeFrom(*source);
  }
}

void DocumentChange::MergeFrom(const DocumentChange& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.DocumentChange)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  target_ids_.MergeFrom(from.target_ids_);
  removed_target_ids_.MergeFrom(from.removed_target_ids_);
  if (from.has_document()) {
    mutable_document()->::google::firestore::v1beta1::Document::MergeFrom(from.document());
  }
}

void DocumentChange::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.DocumentChange)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DocumentChange::CopyFrom(const DocumentChange& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.DocumentChange)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DocumentChange::IsInitialized() const {
  return true;
}

void DocumentChange::Swap(DocumentChange* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DocumentChange::InternalSwap(DocumentChange* other) {
  using std::swap;
  target_ids_.InternalSwap(&other->target_ids_);
  removed_target_ids_.InternalSwap(&other->removed_target_ids_);
  swap(document_, other->document_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata DocumentChange::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void DocumentDelete::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_DocumentDelete_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
}
void DocumentDelete::clear_read_time() {
  if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
    delete read_time_;
  }
  read_time_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DocumentDelete::kDocumentFieldNumber;
const int DocumentDelete::kRemovedTargetIdsFieldNumber;
const int DocumentDelete::kReadTimeFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DocumentDelete::DocumentDelete()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentDelete();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.DocumentDelete)
}
DocumentDelete::DocumentDelete(const DocumentDelete& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      removed_target_ids_(from.removed_target_ids_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  document_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.document().size() > 0) {
    document_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_);
  }
  if (from.has_read_time()) {
    read_time_ = new ::google::protobuf::Timestamp(*from.read_time_);
  } else {
    read_time_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.DocumentDelete)
}

void DocumentDelete::SharedCtor() {
  document_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  read_time_ = NULL;
  _cached_size_ = 0;
}

DocumentDelete::~DocumentDelete() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.DocumentDelete)
  SharedDtor();
}

void DocumentDelete::SharedDtor() {
  document_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete read_time_;
}

void DocumentDelete::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DocumentDelete::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const DocumentDelete& DocumentDelete::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentDelete();
  return *internal_default_instance();
}

DocumentDelete* DocumentDelete::New(::google::protobuf::Arena* arena) const {
  DocumentDelete* n = new DocumentDelete;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DocumentDelete::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.DocumentDelete)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  removed_target_ids_.Clear();
  document_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
    delete read_time_;
  }
  read_time_ = NULL;
  _internal_metadata_.Clear();
}

bool DocumentDelete::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.DocumentDelete)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string document = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_document()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->document().data(), static_cast<int>(this->document().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.DocumentDelete.document"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Timestamp read_time = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_read_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int32 removed_target_ids = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_removed_target_ids())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 50u, input, this->mutable_removed_target_ids())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.DocumentDelete)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.DocumentDelete)
  return false;
#undef DO_
}

void DocumentDelete::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.DocumentDelete)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string document = 1;
  if (this->document().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->document().data(), static_cast<int>(this->document().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.DocumentDelete.document");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->document(), output);
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, *this->read_time_, output);
  }

  // repeated int32 removed_target_ids = 6;
  if (this->removed_target_ids_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(6, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _removed_target_ids_cached_byte_size_));
  }
  for (int i = 0, n = this->removed_target_ids_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
      this->removed_target_ids(i), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.DocumentDelete)
}

::google::protobuf::uint8* DocumentDelete::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.DocumentDelete)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string document = 1;
  if (this->document().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->document().data(), static_cast<int>(this->document().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.DocumentDelete.document");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->document(), target);
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, *this->read_time_, deterministic, target);
  }

  // repeated int32 removed_target_ids = 6;
  if (this->removed_target_ids_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      6,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _removed_target_ids_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32NoTagToArray(this->removed_target_ids_, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.DocumentDelete)
  return target;
}

size_t DocumentDelete::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.DocumentDelete)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated int32 removed_target_ids = 6;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->removed_target_ids_);
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _removed_target_ids_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // string document = 1;
  if (this->document().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->document());
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->read_time_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DocumentDelete::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.DocumentDelete)
  GOOGLE_DCHECK_NE(&from, this);
  const DocumentDelete* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const DocumentDelete>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.DocumentDelete)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.DocumentDelete)
    MergeFrom(*source);
  }
}

void DocumentDelete::MergeFrom(const DocumentDelete& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.DocumentDelete)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  removed_target_ids_.MergeFrom(from.removed_target_ids_);
  if (from.document().size() > 0) {

    document_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_);
  }
  if (from.has_read_time()) {
    mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  }
}

void DocumentDelete::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.DocumentDelete)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DocumentDelete::CopyFrom(const DocumentDelete& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.DocumentDelete)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DocumentDelete::IsInitialized() const {
  return true;
}

void DocumentDelete::Swap(DocumentDelete* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DocumentDelete::InternalSwap(DocumentDelete* other) {
  using std::swap;
  removed_target_ids_.InternalSwap(&other->removed_target_ids_);
  document_.Swap(&other->document_);
  swap(read_time_, other->read_time_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata DocumentDelete::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void DocumentRemove::InitAsDefaultInstance() {
  ::google::firestore::v1beta1::_DocumentRemove_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>(
      ::google::protobuf::Timestamp::internal_default_instance());
}
void DocumentRemove::clear_read_time() {
  if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
    delete read_time_;
  }
  read_time_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DocumentRemove::kDocumentFieldNumber;
const int DocumentRemove::kRemovedTargetIdsFieldNumber;
const int DocumentRemove::kReadTimeFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DocumentRemove::DocumentRemove()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentRemove();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.DocumentRemove)
}
DocumentRemove::DocumentRemove(const DocumentRemove& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      removed_target_ids_(from.removed_target_ids_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  document_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.document().size() > 0) {
    document_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_);
  }
  if (from.has_read_time()) {
    read_time_ = new ::google::protobuf::Timestamp(*from.read_time_);
  } else {
    read_time_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.DocumentRemove)
}

void DocumentRemove::SharedCtor() {
  document_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  read_time_ = NULL;
  _cached_size_ = 0;
}

DocumentRemove::~DocumentRemove() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.DocumentRemove)
  SharedDtor();
}

void DocumentRemove::SharedDtor() {
  document_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete read_time_;
}

void DocumentRemove::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DocumentRemove::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const DocumentRemove& DocumentRemove::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentRemove();
  return *internal_default_instance();
}

DocumentRemove* DocumentRemove::New(::google::protobuf::Arena* arena) const {
  DocumentRemove* n = new DocumentRemove;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DocumentRemove::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.DocumentRemove)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  removed_target_ids_.Clear();
  document_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
    delete read_time_;
  }
  read_time_ = NULL;
  _internal_metadata_.Clear();
}

bool DocumentRemove::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.DocumentRemove)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string document = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_document()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->document().data(), static_cast<int>(this->document().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "google.firestore.v1beta1.DocumentRemove.document"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated int32 removed_target_ids = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_removed_target_ids())));
        } else if (
            static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 18u, input, this->mutable_removed_target_ids())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Timestamp read_time = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_read_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.DocumentRemove)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.DocumentRemove)
  return false;
#undef DO_
}

void DocumentRemove::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.DocumentRemove)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string document = 1;
  if (this->document().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->document().data(), static_cast<int>(this->document().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.DocumentRemove.document");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->document(), output);
  }

  // repeated int32 removed_target_ids = 2;
  if (this->removed_target_ids_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
        _removed_target_ids_cached_byte_size_));
  }
  for (int i = 0, n = this->removed_target_ids_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
      this->removed_target_ids(i), output);
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, *this->read_time_, output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.DocumentRemove)
}

::google::protobuf::uint8* DocumentRemove::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.DocumentRemove)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string document = 1;
  if (this->document().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->document().data(), static_cast<int>(this->document().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1beta1.DocumentRemove.document");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->document(), target);
  }

  // repeated int32 removed_target_ids = 2;
  if (this->removed_target_ids_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      2,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
        static_cast< ::google::protobuf::int32>(
            _removed_target_ids_cached_byte_size_), target);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32NoTagToArray(this->removed_target_ids_, target);
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, *this->read_time_, deterministic, target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.DocumentRemove)
  return target;
}

size_t DocumentRemove::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.DocumentRemove)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // repeated int32 removed_target_ids = 2;
  {
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
      Int32Size(this->removed_target_ids_);
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
            static_cast< ::google::protobuf::int32>(data_size));
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _removed_target_ids_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // string document = 1;
  if (this->document().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->document());
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *this->read_time_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DocumentRemove::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.DocumentRemove)
  GOOGLE_DCHECK_NE(&from, this);
  const DocumentRemove* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const DocumentRemove>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.DocumentRemove)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.DocumentRemove)
    MergeFrom(*source);
  }
}

void DocumentRemove::MergeFrom(const DocumentRemove& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.DocumentRemove)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  removed_target_ids_.MergeFrom(from.removed_target_ids_);
  if (from.document().size() > 0) {

    document_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_);
  }
  if (from.has_read_time()) {
    mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  }
}

void DocumentRemove::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.DocumentRemove)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DocumentRemove::CopyFrom(const DocumentRemove& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.DocumentRemove)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DocumentRemove::IsInitialized() const {
  return true;
}

void DocumentRemove::Swap(DocumentRemove* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DocumentRemove::InternalSwap(DocumentRemove* other) {
  using std::swap;
  removed_target_ids_.InternalSwap(&other->removed_target_ids_);
  document_.Swap(&other->document_);
  swap(read_time_, other->read_time_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata DocumentRemove::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
}


// ===================================================================

void ExistenceFilter::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ExistenceFilter::kTargetIdFieldNumber;
const int ExistenceFilter::kCountFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ExistenceFilter::ExistenceFilter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsExistenceFilter();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ExistenceFilter)
}
ExistenceFilter::ExistenceFilter(const ExistenceFilter& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&target_id_, &from.target_id_,
    static_cast<size_t>(reinterpret_cast<char*>(&count_) -
    reinterpret_cast<char*>(&target_id_)) + sizeof(count_));
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ExistenceFilter)
}

void ExistenceFilter::SharedCtor() {
  ::memset(&target_id_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&count_) -
      reinterpret_cast<char*>(&target_id_)) + sizeof(count_));
  _cached_size_ = 0;
}

ExistenceFilter::~ExistenceFilter() {
  // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ExistenceFilter)
  SharedDtor();
}

void ExistenceFilter::SharedDtor() {
}

void ExistenceFilter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ExistenceFilter::descriptor() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const ExistenceFilter& ExistenceFilter::default_instance() {
  ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsExistenceFilter();
  return *internal_default_instance();
}

ExistenceFilter* ExistenceFilter::New(::google::protobuf::Arena* arena) const {
  ExistenceFilter* n = new ExistenceFilter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ExistenceFilter::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ExistenceFilter)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  ::memset(&target_id_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&count_) -
      reinterpret_cast<char*>(&target_id_)) + sizeof(count_));
  _internal_metadata_.Clear();
}

bool ExistenceFilter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ExistenceFilter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // int32 target_id = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &target_id_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // int32 count = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &count_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ExistenceFilter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ExistenceFilter)
  return false;
#undef DO_
}

void ExistenceFilter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ExistenceFilter)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 target_id = 1;
  if (this->target_id() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->target_id(), output);
  }

  // int32 count = 2;
  if (this->count() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->count(), output);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
  }
  // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ExistenceFilter)
}

::google::protobuf::uint8* ExistenceFilter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ExistenceFilter)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 target_id = 1;
  if (this->target_id() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->target_id(), target);
  }

  // int32 count = 2;
  if (this->count() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->count(), target);
  }

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ExistenceFilter)
  return target;
}

size_t ExistenceFilter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ExistenceFilter)
  size_t total_size = 0;

  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
  }
  // int32 target_id = 1;
  if (this->target_id() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->target_id());
  }

  // int32 count = 2;
  if (this->count() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->count());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ExistenceFilter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ExistenceFilter)
  GOOGLE_DCHECK_NE(&from, this);
  const ExistenceFilter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ExistenceFilter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ExistenceFilter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ExistenceFilter)
    MergeFrom(*source);
  }
}

void ExistenceFilter::MergeFrom(const ExistenceFilter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ExistenceFilter)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.target_id() != 0) {
    set_target_id(from.target_id());
  }
  if (from.count() != 0) {
    set_count(from.count());
  }
}

void ExistenceFilter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ExistenceFilter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ExistenceFilter::CopyFrom(const ExistenceFilter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ExistenceFilter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ExistenceFilter::IsInitialized() const {
  return true;
}

void ExistenceFilter::Swap(ExistenceFilter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ExistenceFilter::InternalSwap(ExistenceFilter* other) {
  using std::swap;
  swap(target_id_, other->target_id_);
  swap(count_, other->count_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ExistenceFilter::GetMetadata() const {
  protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace v1beta1
}  // namespace firestore
}  // namespace google

// @@protoc_insertion_point(global_scope)
